﻿<UserControl x:Class="FreeGoo.WpfDemo.ScrollCanvas"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Height="300" Width="300">
    <ScrollViewer Margin="0,0,0,0" Name="ScrollViewer" CanContentScroll="True" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden" BorderBrush="AliceBlue" MouseMove="Canvas_MouseMove" MouseDown="Canvas_MouseDown">
        <Canvas Width="600" Height="600" x:Name="Canvas">
            <Rectangle x:Name="Top" Margin="0,0,0,0"  Fill="Brown" MaxHeight="10" Width="500" ClipToBounds="True" Height="10" Opacity="0.2"></Rectangle>
            <Rectangle x:Name="Left" Margin="0,0,0,0" Fill="Brown" MaxHeight="500" Width="10" ClipToBounds="True" Height="1000" Opacity="0.2"></Rectangle>
        </Canvas>
    </ScrollViewer>
</UserControl>
